import type { Metadata } from "next";
import "./globals.css";
import { Providers } from "./providers";

export const metadata: Metadata = {
  title: "SM809 Gaming Mouse",
  description: "前行者, 年轻代的选择!",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" data-theme="dark">
      <head>
        <script
          dangerouslySetInnerHTML={{
            __html: `
              (function() {
                document.documentElement.setAttribute('data-theme', 'dark');
                localStorage.setItem('chakra-ui-color-mode', 'dark');
              })()
            `,
          }}
        />
      </head>
      <body className="chakra-ui-dark">
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}
